<script>
	export default {
		
		onLaunch: function() {
			const token = uni.getStorageSync('token');
			if(!token) return;
			const {isLogin, time} = token || {};
			if(isLogin){
				const nowTimestamp = Date.now();
				const timeDifference = Math.abs(nowTimestamp - time);
				const isMoreThanSevenDays = timeDifference > (7 * 24 * 60 * 60 * 1000);
				if(isMoreThanSevenDays){
					uni.removeStorageSync('token');
				}
			}else{
				uni.removeStorageSync('token');
			}
			//console.log('App Launch1')
		},
		onShow: function() {
			//console.log('App Show')
		},
		onHide: function() {
			//console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	body{
		height: 100%;
	}
</style>
